/* =============================================
   Eagle River Tubing Co. — responsive overrides
   Targets inline-styled layouts via .ertc-* classes.
   Inline styles win on specificity → use !important.
   ============================================= */

/* Tablet (≤900px): collapse 3+ col grids to 2 cols, shrink padding */
@media (max-width: 900px) {
  .ertc-grid-3,
  .ertc-grid-4 { grid-template-columns: 1fr 1fr !important; }

  .ertc-pad-x { padding-left: 24px !important; padding-right: 24px !important; }

  /* allow hero / two-col layouts to stack */
  .ertc-2col { grid-template-columns: 1fr !important; gap: 28px !important; }
}

/* Mobile (≤640px): single column everywhere, smaller type */
@media (max-width: 640px) {
  .ertc-grid-2,
  .ertc-grid-3,
  .ertc-grid-4,
  .ertc-2col,
  .ertc-3col-uneven { grid-template-columns: 1fr !important; gap: 18px !important; }

  /* HERO specifically: bigger gap so the rotated OPEN DAILY badge has clearance
     above the photo and doesn't crash into the "Life jacket / ½ mile" feature row */
  .ertc-hero-2col { gap: 44px !important; }

  /* OPEN DAILY badge: pull inside the photo on mobile so it doesn't poke up
     into the feature pills sitting just above it */
  .ertc-open-badge { top: 10px !important; left: 10px !important; }

  /* page padding */
  .ertc-page { padding-left: 18px !important; padding-right: 18px !important; padding-top: 28px !important; }
  .ertc-pad-x { padding-left: 18px !important; padding-right: 18px !important; }
  .ertc-section { padding: 28px 18px !important; }

  /* big headings shrink */
  .ertc-h1 { font-size: 36px !important; line-height: 1.05 !important; }
  .ertc-h2 { font-size: 24px !important; }
  .ertc-h3 { font-size: 20px !important; }

  /* hero text column: center the headline + supporting copy on mobile */
  .ertc-hero-2col > div:first-child { text-align: center !important; }
  .ertc-hero-2col > div:first-child > p { margin-left: auto !important; margin-right: auto !important; }
  .ertc-hero-2col > div:first-child > .ertc-h1 { display: block !important; }

  /* Tubing page hero h1: center on mobile to match other pages */
  .ertc-tubing-hero-h1 { display: block !important; text-align: center !important; margin-left: auto !important; margin-right: auto !important; }

  /* hero photo doesn't need huge top offset */
  .ertc-hero-photo-tag { top: -10px !important; left: -8px !important; font-size: 11px !important; padding: 6px 10px !important; }

  /* override max-width artificial constraints */
  .ertc-narrow-80 { max-width: 100% !important; }
  .ertc-narrow-60 { max-width: 100% !important; }

  /* center cards previously side-by-side */
  .ertc-cta-card { flex-direction: column !important; align-items: flex-start !important; }
  .ertc-cta-card > * { flex: 1 1 auto !important; }

  /* footer: stack */
  .ertc-footer { flex-direction: column !important; align-items: flex-start !important; gap: 12px !important; padding: 22px 18px !important; }
  .ertc-footer-nav { flex-wrap: wrap !important; gap: 12px 18px !important; }

  /* form column flips */
  .ertc-contact-grid { grid-template-columns: 1fr !important; }

  /* hide oversize calendar/feature labels gracefully via flex-wrap (already wrapping) */

  /* floating "open daily" badge — keep but smaller */
  .ertc-photo-frame > div { aspect-ratio: 4/3; }
}

/* Header: drawer below 960px (7 nav chips don't fit cleanly) */
.ertc-mobile-toggle { display: none; }
.ertc-nav-desktop { display: flex; }
.ertc-nav-mobile  { display: none; }

@media (max-width: 960px) {
  .ertc-nav-desktop { display: none !important; }
  .ertc-header { padding: 12px 18px !important; }
  .ertc-brand img { height: 104px !important; }

  /* floating hamburger — stays pinned top-right while user scrolls */
  .ertc-mobile-toggle {
    display: inline-flex !important;
    position: fixed !important;
    top: 14px !important;
    right: 14px !important;
    z-index: 60 !important;
    background: var(--ertc-paper) !important;
  }
  /* extra room so brand logo doesn't tuck under the floating button */
  .ertc-header { padding-right: 76px !important; }
  .ertc-brand-stack > div:nth-child(1),
  .ertc-brand-stack > div:nth-child(2) { font-size: 28px !important; }
  .ertc-brand-stack > div:nth-child(3) { font-size: 22px !important; }
}

@media (max-width: 480px) {
  .ertc-h1 { font-size: 30px !important; }
  .ertc-pricing-row { flex-direction: column !important; gap: 6px !important; }
  /* keep brand stack visible — just tighten it so "Eagle River Tubing Co. est. 2026" still reads */
  .ertc-brand img { height: 84px !important; }
  .ertc-brand-stack > div:nth-child(1),
  .ertc-brand-stack > div:nth-child(2) { font-size: 22px !important; letter-spacing: 0 !important; }
  .ertc-brand-stack > div:nth-child(3) { font-size: 19px !important; }
}

/* Slideshow arrows: pull in slightly on small screens so they don't crowd dot pills */
@media (max-width: 480px) {
  .ertc-section [aria-label="Previous photo"],
  .ertc-section [aria-label="Next photo"],
  .ertc-page    [aria-label="Previous"],
  .ertc-page    [aria-label="Next"] {
    width: 40px !important; height: 40px !important;
    font-size: 18px !important;
  }
}

/* Mobile drawer */
.ertc-drawer {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(15,42,63,0.55);
  display: none;
  animation: ertcFade 180ms ease;
}
.ertc-drawer.open { display: block; }
.ertc-drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(86vw, 340px);
  background: var(--ertc-paper);
  border-left: 2px solid var(--ertc-ink);
  box-shadow: -6px 0 0 var(--ertc-ink);
  display: flex; flex-direction: column;
  padding: 18px 22px;
  animation: ertcSlide 220ms cubic-bezier(.2,.7,.2,1);
}
.ertc-drawer-close {
  align-self: flex-end;
  width: 40px; height: 40px; border-radius: 999px;
  border: 2px solid var(--ertc-ink); background: var(--ertc-paper);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  color: var(--ertc-ink); padding: 0;
}
.ertc-drawer-link {
  display: block; padding: 14px 4px;
  font-family: var(--font-body); font-weight: 800; font-size: 18px;
  letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--ertc-ink); text-decoration: none;
  border-bottom: 1.5px dashed rgba(15,42,63,0.18);
}
.ertc-drawer-link.active { color: var(--ertc-life); }

@keyframes ertcFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ertcSlide { from { transform: translateX(100%); } to { transform: translateX(0); } }

/* prevent horizontal scroll on small screens */
html, body { overflow-x: hidden; max-width: 100vw; }
img, svg { max-width: 100%; }
